﻿<script type="text/template" id="list-user-item-template">
    <td class="text-center">
        <%= model.Order %>
    </td>
    <td>
        <%= model.UserName %>
    </td>
    <td>
        <%= model.FullName %>
    </td>
    <td>
        <%= model.Email %>
    </td>
    <td>
        <%= model.Gender ==true? 'Nam':'Nữ' %>
    </td>
    <td align='center'>
       <input type="checkbox"  <%= model.IsApproved == true ? 'checked="checked"' : '' %> name = "IsApproved" class="cbxIsApproved" />
    </td>
    <td>
        <a href="javascript:void(0);" class="grid-user-role"><%= jsResources.lang.ManageUserViewRoles %></a>    
    </td>
    <td>
        <a href="javascript:void(0);" class="grid-update-user"><%= jsResources.lang.GridEdit %></a>    
    </td>
    <td>
         <a href="javascript:void(0);" class="grid-delete-user"><%= jsResources.lang.GridDelete %></a>               
    </td>
</script>
<script type="text/template" id="list-user-role">
<td>
 <input type="checkbox" <%= model.IsInRole==true? 'checked="checked"':'' %> name="IsInRole" class="cbxIsInRole" />   
</td>
<td><%= model.RoleName %></td>
<td><%= model.RoleDisplayName %></td>
</script>
<script type="text/template" id="user-form-template">
    <div id="user-form-error" class="error"></div>
    <form id="user-form" onsubmit="return false;">
        <ul class="idata-form">
            <li>
                <span class="idata-form-title">
                    <%= jsResources.lang.ManageUserUserName %>    
                </span>
                <span>
                    <input type="text" name="UserName" id="UserName" required value="<%= model.UserName %>" <%= model.UserName != '' ? 'disabled="disabled"' : '' %>/>
                </span>
            </li>
            <li>
                <span class="idata-form-title">
                    <%= jsResources.lang.ManageUserFullName %>
                </span>
                <span>
                    <input type="text" name="FullName" id="FullName" required value="<%= model.FullName %>" />
                </span>
            </li>
            <li class='hide-in-update'>
                <span class="idata-form-title">
                    <%= jsResources.lang.ManageUserPassword %>
                </span>
                <span>               
                    <input type="password" id="Password" name="Password" required value ="<%= model.Password %>"  />
                </span>
            </li>
            <li class='hide-in-update'>
                <span class="idata-form-title">
                    <%= jsResources.lang.ManageUserConfirmPassword %>
                </span>
                <span><input type="password" id="ConfirmPassword" name="ConfirmPassword" required value ="<%= model.ConfirmPassword %>"  />

                </span>
            </li>
            <li>
                <span class="idata-form-title">
                    <%= jsResources.lang.ManageUserEmail %>    
                </span>
                <span>
                    <input type="text" id="Email" name ="Email" value="<%= model.Email %>" required /> 
                </span>
            </li>
            <li>
                <span class="idata-form-title">
                    <%= jsResources.lang.ManageUserGender %>    
                </span>
                <span>
                    <input type="checkbox" name = "Gender" id="Gender" <%= model.Gender == true ? 'checked="checked"' : '' %> />
                </span>
            </li>
            <li>
                <span class="idata-form-title">
                    <%= jsResources.lang.ManageUserMobile %>
                </span>
                <span>
                    <input type="text" id="Mobile" name ="Mobile" value="<%= model.Mobile %>" /> 
                </span>
            </li>
            <li>
                <span class="idata-form-title">
                    <%= jsResources.lang.ManageUserAddress %>
                </span>
                <span>
                    <input type="text" id="Address" name ="Address" value="<%= model.Address %>" /> 
                </span>
            </li>
            <li>
                <span class="idata-form-title">
                    <%= jsResources.lang.ManageUserIsApproved %>    
                </span>
                <span>
                    <input type="checkbox" name = "IsApproved" id="IsApproved" <%= model.IsApproved == true ? 'checked="checked"' : '' %> />
                </span>
            </li>
        </ul>
    </form>

</script>
